//
//  MovieDetailViewController.m
//  豆瓣网络请求StoryBoard版
//
//  Created by JP on 16/1/29.
//  Copyright © 2016年 jp. All rights reserved.
//

#import "MovieDetailViewController.h"
#import "UIImageView+WebCache.h"

@interface MovieDetailViewController ()

@property (nonatomic, strong) ModelDetailModel *movieDetailModle;

@end

@implementation MovieDetailViewController

- (instancetype)initWithMovieDetailModel:(ModelDetailModel *)model
{
    self = [super init];
    if (self) {
        self.movieDetailModle = model;
        
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.titleLabel.text = self.movieDetailModle.title;
    self.original_titleLabel.text = self.movieDetailModle.original_title;
    [self.detailImageView sd_setImageWithURL:[NSURL URLWithString:self.movieDetailModle.imageModel.large]];
    
    
    
    
    // Do any additional setup after loading the view from its nib.
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [self dismissViewControllerAnimated:YES completion:^{
        
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
